/*
 * @Author: your name
 * @Date: 2021-10-27 09:55:16
 * @LastEditTime: 2021-11-03 10:54:11
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /egg_ payment/config/config.default.js
 */
/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1635299712241_4146';

  // add your middleware config here
  config.middleware = [];

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };
  
  config.payConfig = {
		appId: '2021000118638538',
		privateKey: 'MIIEpQIBAAKCAQEAm0/px+F5kjN8brb5s6Dpc89wjcR9fUwAzFjebQUVMRr1oYKEH2znu53uDnA95YyZ9mzPR0TSaqXD348UGvdXQuXyBpNo0PHxWjwZW8zmu60eRyoxz5n5jUDZ+espad3mgxcqpmI2mU1sy09gKFTUCHH0gYGBBRHfMPdhTrWMhteRQ6SmHrCwvHeBmuH18e+kVSY0ITUID405hKOeIiku2qXWn3t++AJAzHnNi+/1F5Hk2NbQ6ZWnbu7CXGUZV71pyXhmNRCdjfJ1QfkuXEvFO3F5aiV1dF3kIRALck/7+lsjnex1UiAJ8femlG9kwbHu7SWcUxQIi/8j2qtSQkteIwIDAQABAoIBAAor3Z+dgJy2inuluAyviRpwh2qBZ8aA57x6RXbWUmD45wVAyu5T74k1+pUvfJ4/6wVccuaz9yPM31sQv7xUXn6fGI6dsMueTLQgI3kDnkjEOatndAOojdNWX/AiGoA4bBRBvCVRYUoA7BMUi7OYeppi/CRPGuf+F6PZT6Ib+awK775MxDFT1VW+LbpiJJAR2RjPZ+gTAAz/g4w3wSGBS8FHSE+V2jHOcGDUfkusNHuykChqqBqlThcL/tx1weXwbwuP1lbdQxpY9pl+pjEnLMcC+fDGjrvcIIrQD5QxoY5TPYQqfui5hvsUXF38b4mpp5BJvEwuRERu6JKPO7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qi/aBjO6djVIeE2ML7CBHcM/ILpEqA2J93Bmpyn8F+yVYfjBQcv10bgky1nrNcajGaB45v+TtJL1fBt1ARvknh34+Zxl8BpA7+KDKf26v6icJhfszIBIoa+DjHFmWQyx6smb7UIUoFoQul8bj1DCbZGn6waib1pM2Xq9HFni7Hnabb4OhpxDGji6M7HI7jgHrI3UQ8TtGQIDAQAB', // 支付宝公钥（不是应用公钥）
		signType: 'RSA2', // RSA2
		gateway: 'https://openapi.alipaydev.com/gateway.do', // 网关地址
		timeout: 5000, // 网关超时时间
		camelcase: true // 是否把网关返回的下划线 key 转换为驼峰写法
	}

  config.userInfo = {
    client_id: '2fd131d8ba791ce64dd529f4f4fccb84a7046d21553c825494af8101d5c3e6bc',
    redirect_uri: 'http://localhost:8080/login',
    client_secret: '88eddc72dfee96a387528cf5ec4ca6dfaa427dba41bd6bacbd27ffd0b025c1f3'
  }
  
  config.security = {
    csrf: {
        enable: false, 
    },
  };

  config.multipart = {
    mode:'file',
    // fileExtensions:[       //新增文件类型  fileExtensions属性为 whilelist 新增文件白名单  此处支持 .xlsx 后缀文件
    //   '.jpg',
    //   '.jpeg',
    //   '.png'   
    // ]
  }

  return {
    ...config,
    ...userConfig,
  };
};
